<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导入问题</title>
<include file="./Apps/BoxAdmin/View/Public/header.html" />
</head>
<body>
 
    
 
        <div class="list_vmall_man">
        	<div class="list_vmall_le">
            	<!-- <p class="list_vmall_bin"><a href="<{:U('level')}>" target="_black">会员等级管理</a></p> -->
               

              
                  <include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
               
            </div>
            <div class="list_vmall_rig">
          
 <section class="content">
        <div class="page-content" >
            
    <div class="panel panel-default">
        <div class="panel-heading">
          导入
        </div>
        <div class="panel-body">
       <form enctype="multipart/form-data" action="<{:U('Questions/importdo')}>" method="post" class="form-horizontal">
			
			
				<div class="form-group">
                    <label class="col-sm-2 control-label">选择课程</label>
                    <div class="col-sm-8">
                      <select class="combox" id="isubjectselect" target="isectionselect" refurl="<{:U('Subject/get_ajax_section',array('type'=>'_sel'))}>?subjectid={value}" autocomplete="off">
			        		<option value="0">选择课程</option>
					  			<volist name="subject_list" id="vo">
						  			<option value="<{$vo.subjectid}>"><{$vo.subject}></option>
								</volist>	
					  	</select>
				  		<select class="combox" id="isectionselect" target="iknowsselect" refurl="<{:U('Subject/get_ajax_knows',array('type'=>'_sel'))}>?sectionid={value}" autocomplete="off">
				  			<option value="0">全部</option>
				  		</select>
				  		<select class="combox" id="iknowsselect" autocomplete="off">
				  		<option value="0">全部</option>
				  		</select>
						<input type="button" class="btn" value="选定" onclick="javascript:setKnowsList('questionknowsid','iknowsselect','+');" autocomplete="off">
			  			<input type="button" class="btn" value="清除" onclick="javascript:setKnowsList('questionknowsid','iknowsselect','-');" autocomplete="off">
                    </div>
                    <div class="col-sm-3" id="for_select_div">
					
                    </div>
                </div>
				
				<style>
				.form-group textarea{ width:100%;}
				</style>
				 <div class="form-group">
                    <label class="col-sm-2 control-label">知识点</label>
                    <div class="col-sm-7">
					<volist name="data['quest2knows']" id="vo">
	<input type="hidden" name="questionsubjectid[<{$vo.qkquestionsubjectid}>]" class="questionsubjectid" value="<{$vo.qkquestionsubjectid}>">
	<input type="hidden" name="qkknowsid[<{$vo.qkknowsid}>]" class="qkknowsid" value="<{$vo.qkknowsid}>">
	<input type="hidden" name="questionsectionid[<{$vo.questionsectionid}>]" class="questionsectionid" value="<{$vo.questionsectionid}>">
					</volist>
                       <textarea  rows="4"   name="questionknowsid" id="questionknowsid" readonly="" autocomplete="off"><{$data.questionknowsid}></textarea>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-sm-2 control-label">选择excel</label>
                    <div class="col-sm-7">
					<input type="file" name="excel" id="excel" /><a href="/Apps/question.xlsx">样本下载</a>
                       
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				
  
				<div class="control-group">
				  	<div class="col-sm-offset-2 col-sm-7">
					<input type="submit"  class="btn btn-primary"  value="提交" />
					 
				</div>
			 
				 
			</form>
        </div>
    </div>
   

        </div>
    </section>
                
                </div>
            </div>
       
        
    </div>
 
     
 <script type="text/javascript">
    $('#excel').change(function(){
        var excel=$(this).val();
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }
    })
    $('#myform').submit(function(){
    
        var excel=$('#excel').val();
        if(excel==''){
            alert('请上传excel文件');
            return false;
        }
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }

    })
</script>
</body>
</html>
